import json
class Student(object):
	"""docstring for Student"""
	def __init__(self, name, age, sorce):
		self.name = name
		self.age = age
		self.sorce = sorce

	def __str__(self):
		return 'Student object (%s, %s, %s)' % (self.name, self.age, self.sorce)
s = Student('Bob', 20, 88)
std_data = json.dumps(s, default = lambda d: d.__dict__)
print(std_data)

rebuild = json.loads(std_data, object_hook = lambda d: Student(d['name'], d['age'], d['sorce']))
print(rebuild)